<div id="form"></div>
<script>
var leftcolw=360;
var rightcolw;
var twocol=true;

var frm=$("#form").ajajform({
	header: "{{!Delete page}}",
	layouttemplate: '<div class="af-peditcol1"></div><div class="af-peditcol2"></div><div style="clear: both;"></div>',
	submit: {
		url: '{{action}}',
		value: "{{!Delete}}",
		ajaj: true,
		click: function() { frm.ajajform("setSubmitParam","save_only",""); return 1; },
		params: {mode: "delete2",id: '{{fields.id}}',ajaj: 1}
	}
});
frm.ajajform("insertWidget",'.af-peditcol1',null,{
	type: "label",
	name: "template_id",
	label: "{{!Page template}}",
	width: leftcolw,
	cssclass: "afw-select leftcolw1",
	value: "{{cpage.template_name}}"
});
frm.ajajform("insertWidget",'.af-peditcol1',null,{
	type: "label",
	name: "alias",
	label: "{{!URL}}",
	width: leftcolw-10,
	cssclass: "afw-textedit leftcolw2",
	value: {{JSON:cpage.alias}}
});
frm.ajajform("insertWidget",'.af-peditcol1',null,{type: "label",name: "name",label: "{{!Name}}",width: leftcolw-10,cssclass: "afw-label leftcolw2",value: {{JSON:cpage.name}}});
frm.ajajform("insertWidget",'.af-peditcol1',null,{type: "label",name: "prerun",label: "{{!Prerun controller}}",width: leftcolw-10,cssclass: "afw-label leftcolw2",value: {{JSON:cpage.prerun}}});
frm.ajajform("insertWidget",'.af-peditcol1',null,{type: "label",name: "cssclass",label: "{{!CSS Class}}",width: leftcolw-10,cssclass: "afw-label leftcolw2",value: {{JSON:cpage.cssclass}}});

AdminPagesFuncs.window_resize();

</script>

